<template>
	<view class="box">
		<view class="top">
			<view class="left">
				<image :src="`../../static/images/${info.lottery_id}.png`" mode=""></image>
				<view class="conter">
					
					<span >{{info.lottery_no}}</span>
				</view>
			</view>
			<view class="right" @click="hash">
				历史中奖记录
			</view>
			
			
		</view>
		<view class="buttom">
			<span  v-for="(item,index) in info.lottery_res.split(',')"  class="red">{{item}}</span>
		</view>
		<view class="price">
			<view class="zuo">
				<view >
					本次金额（元）
				</view>
				<view >
					{{info.lottery_sale_amount}}
				</view>
			</view>
			<view class="you">
				<view >
					奖池金额（元）
				</view>
				<view >
					{{info.lottery_pool_amount}}
				</view>
			</view>
		</view>
		<view class="table">
			<view class="thead">
				<view>
					奖池
				</view>
				<view>
					中奖操作
				</view>
				<view>
					中奖
				</view>
				<view>
					asdas（元）
				</view>
			</view>
			<view class="tbody" v-for="(item,index) in info.lottery_prize">
				<view>
					{{item.prize_name}}
				</view>
				<view>
					{{item.prize_require}}
				</view>
				<view>
					{{item.prize_num}}
				</view>
				<view>
					{{item.prize_amount}}
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
		
	export default {
		data(){
			return {
				info:{}, // 详情数据
				history:'' , // 彩票
				periods:''
			}
		},
		mounted() {  
			// console.log(this.$mp.query.lottery_id);
			this.history = this.$mp.query.lottery_id
			this.periods = this.$mp.query.lottery_no
			uni.request({   //请求接口获取数据
				url:'http://api.aslegou.top/api/cphistorydesc',
				method:'GET',
				data:{
					lottery_id:this.$mp.query.lottery_id,
					lottery_no:this.$mp.query.lottery_no
				},
				success: (res) => {
					this.info = res.data.list
					console.log(this.info);
				}
			})
		},
		methods:{
			hash(){
			}
		}
		
	}
</script>

<style lang="scss">
	.box{
		width: 100%;
		height: 100vh;
		background-color: #fff;
	}
	.top{
		width: 100%;
		display: flex;
		padding: 40rpx;
		justify-content: space-between;
		.left{
			
			display: flex;
			image{
				width: 150rpx;
				height: 150rpx;
				border-radius: 50%;
				
			}
			.conter{
				margin-left: 40rpx;
				line-height: 70rpx;
				.title{
					font-weight: 800;
					font-size: 40rpx
				}
				span{
					color: #ccc;
				}
			}
		}
		.right{
			color: red;
			line-height: 150rpx;
			margin-right: 50rpx;
		}
	}
	.buttom{
		span{
			width: 40rpx;
			height: 40rpx;
			padding: 10px;
			border: 1px solid;
			border-radius: 50%;
			margin-left: 10rpx;
		}
	}
	.price{
		width: 100%;
		margin-top: 40rpx;
		display: flex;
		justify-content: space-between;
		.zuo{
			margin: 0 auto;
			text-align: center;
		}
		.you{
			margin: 0 auto;
			text-align: center;
		}
	}
	.table{
		padding: 20px;
		.thead{
			display: flex;
			justify-content: space-between;
			view{
				text-align: center;
			}
		}
		.tbody{
			display: flex;
			justify-content: space-between;
			view{
				text-align: center;
			}
		}
	}
	
	.blue{
		color: blue;
		border-color: blue;
	}
	.red{
		
			color: red;
			border-color: red;
	}
</style>